from selenium import webdriver
from selenium.webdriver.common.by import By
import time
# 创建浏览器驱动对象
driver = webdriver.Chrome()
# 加载web页面
driver.get("http://121.43.169.97:8848/pageA.html")

# 4.页面操作:通过标签名定位页面元素

driver.find_element(By.XPATH,"/html/body/div/fieldset/form/p[1]/input").send_keys("admin")
driver.find_element(By.XPATH,"/html/body/div/fieldset/form/p[2]/input").send_keys("123456")
driver.find_element(By.XPATH,"/html/body/div/fieldset/form/p[3]/input").send_keys("13855555555")
driver.find_element(By.XPATH,"/html/body/div/fieldset/form/p[4]/input").send_keys("12345@qq.com")
# 暂停3秒
time.sleep(3)
# 关闭驱动对象
driver.quit()